.data
intwrite:
	.string "%d\n"
intread:
	.string "%d"
realwrite:
	.string "%f\n"
realread:
	.string "%f"
.text
.globl main
boo:
	pushl %ebp
	movl %esp,%ebp
	movl %ebp,%edx
	addl $8,%edx
	movl (%edx),%edx
	addl $16,%edx
	movl (%edx),%eax
	pushl %eax
	leal 12(%ebp),%edx
	movl (%edx),%eax
	subl $1,%eax
	movl $4,%ebx
	mull %ebx
	movl %ebp,%edx
	addl $8,%edx
	movl (%edx),%edx
	addl $8,%edx
	movl (%edx),%edx
	subl $56,%edx
	addl %eax,%edx
	popl %eax
	movl %eax,(%edx)
	leave
	movl (%esp),%ebx
	leal 12(%esp),%esp
	movl %ebx,(%esp)
	ret
foo:
	pushl %ebp
	movl %esp,%ebp
	subl $8,%esp
	leal 24(%ebp),%edx
	movl (%edx),%eax
	pushl %eax
	movl %ebp,%edx
	addl $8,%edx
	movl (%edx),%edx
	subl $8,%edx
	movl (%edx),%eax
	pushl %eax
	movl %ebp,%edx
	addl $8,%edx
	movl (%edx),%edx
	subl $4,%edx
	movl (%edx),%eax
	popl %ebx
	addl %ebx,%eax
	subl $1,%eax
	movl $4,%ebx
	mull %ebx
	movl %ebp,%edx
	addl $8,%edx
	movl (%edx),%edx
	subl $56,%edx
	addl %eax,%edx
	movl (%edx),%eax
	popl %ebx
	addl %ebx,%eax
	subl $10,%eax
	movl $4,%ebx
	mull %ebx
	movl %ebp,%edx
	addl $8,%edx
	movl (%edx),%edx
	subl $80,%edx
	addl %eax,%edx
	flds (%edx)
	subl $4,%esp
	fstps (%esp)
	leal 24(%ebp),%edx
	movl (%edx),%eax
	pushl %eax
	leal 20(%ebp),%edx
	flds (%edx)
	subl $4,%esp
	fstps (%esp)
	leal 16(%ebp),%edx
	movl (%edx),%eax
	pushl %eax
	leal 12(%ebp),%edx
	flds (%edx)
	subl $4,%esp
	fstps (%esp)
	pushl 8(%ebp)
	call foo
	pushl %eax
	pushl %ebp
	call boo
	movl %ebp,%edx
	addl $8,%edx
	movl (%edx),%edx
	subl $8,%edx
	movl (%edx),%eax
	pushl %eax
	movl %ebp,%edx
	addl $8,%edx
	movl (%edx),%edx
	subl $8,%edx
	movl (%edx),%eax
	popl %ebx
	subl %ebx,%eax
	subl $1,%eax
	movl $4,%ebx
	mull %ebx
	movl %ebp,%edx
	addl $8,%edx
	movl (%edx),%edx
	subl $56,%edx
	addl %eax,%edx
	movl (%edx),%eax
	pushl %eax
	movl %ebp,%edx
	addl $8,%edx
	movl (%edx),%edx
	subl $4,%edx
	movl (%edx),%eax
	pushl %eax
	movl %ebp,%edx
	addl $8,%edx
	movl (%edx),%edx
	subl $4,%edx
	movl (%edx),%eax
	popl %ebx
	mull %ebx
	pushl %eax
	movl $20,%eax
	popl %ebx
	addl %ebx,%eax
	subl $10,%eax
	movl $4,%ebx
	mull %ebx
	movl %ebp,%edx
	addl $8,%edx
	movl (%edx),%edx
	subl $80,%edx
	addl %eax,%edx
	flds (%edx)
	subl $4,%esp
	fstps (%esp)
	movl %ebp,%edx
	addl $8,%edx
	movl (%edx),%edx
	subl $8,%edx
	movl (%edx),%eax
	pushl %eax
	movl %ebp,%edx
	addl $8,%edx
	movl (%edx),%edx
	subl $4,%edx
	movl (%edx),%eax
	popl %ebx
	subl %ebx,%eax
	subl $1,%eax
	movl $4,%ebx
	mull %ebx
	movl %ebp,%edx
	addl $8,%edx
	movl (%edx),%edx
	subl $56,%edx
	addl %eax,%edx
	movl (%edx),%eax
	pushl %eax
	movl %ebp,%edx
	addl $8,%edx
	movl (%edx),%edx
	subl $16,%edx
	flds (%edx)
	movl %ebp,%edx
	addl $8,%edx
	movl (%edx),%edx
	subl $12,%edx
	flds (%edx)
	fsubrp
	subl $4,%esp
	fstps (%esp)
	pushl 8(%ebp)
	call foo
	jmp label0u
label0u:
	leave
	movl (%esp),%ebx
	leal 20(%esp),%esp
	movl %ebx,(%esp)
	ret
main:
	pushl %ebp
	movl %esp,%ebp
	subl $80,%esp
	movl $5,%eax
	leal -8(%ebp),%edx
	movl %eax,(%edx)
	movl $1,%eax
	leal -4(%ebp),%edx
	movl %eax,(%edx)
label1u:
	leal -4(%ebp),%edx
	movl (%edx),%eax
	subl $1,%eax
	movl $4,%ebx
	mull %ebx
	leal -56(%ebp),%edx
	addl %eax,%edx
	movl (%edx),%eax
	pushl %eax
	leal -8(%ebp),%edx
	movl (%edx),%eax
	pushl %eax
	movl $2,%eax
	popl %ebx
	mull %ebx
	popl %ebx
	addl %ebx,%eax
	leal -4(%ebp),%edx
	movl (%edx),%ebx
	cmpl %eax,%ebx
	jg label2u
	movl $1,%eax
	pushl %eax
	leal -4(%ebp),%edx
	movl (%edx),%eax
	subl $10,%eax
	movl $4,%ebx
	mull %ebx
	leal -80(%ebp),%edx
	addl %eax,%edx
	flds (%edx)
	leal -8(%ebp),%edx
	movl (%edx),%eax
	subl $10,%eax
	movl $4,%ebx
	mull %ebx
	leal -80(%ebp),%edx
	addl %eax,%edx
	flds (%edx)
	faddp
	subl $4,%esp
	fstps (%esp)
	leal -4(%ebp),%edx
	movl (%edx),%eax
	pushl %eax
	movl $10,%eax
	subl $1,%eax
	movl $4,%ebx
	mull %ebx
	leal -56(%ebp),%edx
	addl %eax,%edx
	movl (%edx),%eax
	subl $10,%eax
	movl $4,%ebx
	mull %ebx
	leal -80(%ebp),%edx
	addl %eax,%edx
	flds (%edx)
	subl $4,%esp
	fstps (%esp)
	pushl %ebp
	call foo
	pushl %eax
	leal -4(%ebp),%edx
	movl (%edx),%eax
	subl $1,%eax
	movl $4,%ebx
	mull %ebx
	leal -56(%ebp),%edx
	addl %eax,%edx
	popl %eax
	movl %eax,(%edx)
	leal -8(%ebp),%edx
	movl (%edx),%eax
	pushl %eax
	leal -4(%ebp),%edx
	movl (%edx),%eax
	popl %ebx
	cmpl %ebx,%eax
	jl label5u
	movl $0,%eax
	jmp label6u
label5u:
	movl $1,%eax
label6u:
	pushl %eax
	movl $0,%eax
	pushl %eax
	leal -4(%ebp),%edx
	movl (%edx),%eax
	popl %ebx
	cmpl %ebx,%eax
	jg label7u
	movl $0,%eax
	jmp label8u
label7u:
	movl $1,%eax
label8u:
	pushl %eax
	movl $5,%eax
	pushl %eax
	leal -4(%ebp),%edx
	movl (%edx),%eax
	popl %ebx
	cmpl %ebx,%eax
	jle label9u
	movl $0,%eax
	jmp label10u
label9u:
	movl $1,%eax
label10u:
	popl %ebx
	and $1,%eax
	popl %ebx
	and $1,%eax
	cmpl $1,%eax
	jne label3u
	movl $1,%eax
	subl $1,%eax
	movl $4,%ebx
	mull %ebx
	leal -56(%ebp),%edx
	addl %eax,%edx
	movl (%edx),%eax
	pushl %eax
	movl $0x4048f5c3, %eax
	subl $4,%esp
	movl %eax,(%esp)
	flds (%esp)
	addl $4,%esp
	subl $4,%esp
	fstps (%esp)
	movl $3,%eax
	subl $1,%eax
	movl $4,%ebx
	mull %ebx
	leal -56(%ebp),%edx
	addl %eax,%edx
	movl (%edx),%eax
	pushl %eax
	leal -4(%ebp),%edx
	movl (%edx),%eax
	popl %ebx
	mull %ebx
	pushl %eax
	leal -8(%ebp),%edx
	movl (%edx),%eax
	popl %ebx
	addl %ebx,%eax
	pushl %eax
	movl $0x400851ec, %eax
	subl $4,%esp
	movl %eax,(%esp)
	flds (%esp)
	addl $4,%esp
	subl $4,%esp
	fstps (%esp)
	pushl %ebp
	call foo
	pushl %eax
	leal -4(%ebp),%edx
	movl (%edx),%eax
	subl $1,%eax
	movl $4,%ebx
	mull %ebx
	leal -56(%ebp),%edx
	addl %eax,%edx
	movl (%edx),%eax
	popl %ebx
	cmpl %ebx,%eax
	jl label13u
	movl $0,%eax
	jmp label14u
label13u:
	movl $1,%eax
label14u:
	cmpl $1,%eax
	jne label11u
	leal -4(%ebp),%edx
	movl (%edx),%eax
	subl $1,%eax
	movl $4,%ebx
	mull %ebx
	leal -56(%ebp),%edx
	addl %eax,%edx
	movl (%edx),%eax
	leal -8(%ebp),%edx
	movl %eax,(%edx)
	jmp label12u
label11u:
	movl $1,%eax
	pushl %eax
	leal -4(%ebp),%edx
	movl (%edx),%eax
	subl $1,%eax
	movl $4,%ebx
	mull %ebx
	leal -56(%ebp),%edx
	addl %eax,%edx
	movl (%edx),%eax
	popl %ebx
	addl %ebx,%eax
	pushl %eax
	leal -4(%ebp),%edx
	movl (%edx),%eax
	subl $1,%eax
	movl $4,%ebx
	mull %ebx
	leal -56(%ebp),%edx
	addl %eax,%edx
	movl (%edx),%eax
	subl $10,%eax
	movl $4,%ebx
	mull %ebx
	leal -80(%ebp),%edx
	addl %eax,%edx
	flds (%edx)
	subl $4,%esp
	fstps (%esp)
	movl $1,%eax
	pushl %eax
	leal -4(%ebp),%edx
	movl (%edx),%eax
	popl %ebx
	addl %ebx,%eax
	subl $1,%eax
	movl $4,%ebx
	mull %ebx
	leal -56(%ebp),%edx
	addl %eax,%edx
	movl (%edx),%eax
	subl $1,%eax
	movl $4,%ebx
	mull %ebx
	leal -56(%ebp),%edx
	addl %eax,%edx
	movl (%edx),%eax
	pushl %eax
	movl $1,%eax
	pushl %eax
	movl $0x40133333, %eax
	subl $4,%esp
	movl %eax,(%esp)
	flds (%esp)
	addl $4,%esp
	subl $4,%esp
	fstps (%esp)
	movl $4,%eax
	pushl %eax
	movl $0x40b33333, %eax
	subl $4,%esp
	movl %eax,(%esp)
	flds (%esp)
	addl $4,%esp
	subl $4,%esp
	fstps (%esp)
	pushl %ebp
	call foo
	pushl %eax
	movl $13,%eax
	popl %ebx
	addl %ebx,%eax
	subl $10,%eax
	movl $4,%ebx
	mull %ebx
	leal -80(%ebp),%edx
	addl %eax,%edx
	flds (%edx)
	subl $4,%esp
	fstps (%esp)
	pushl %ebp
	call foo
	leal -8(%ebp),%edx
	movl %eax,(%edx)
label12u:
	jmp label4u
label3u:
label4u:
	jmp label1u
label2u:
	leave
	movl $1,%eax
	movl $0,%ebx
	int $0x80
	ret
.bss
	.lcomm heap,8192
